<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<meta content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport" />
<title>微电影大赛投票列表</title>
<link href="/fstsets/mobile/css/style.css" type="text/css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="/fstsets/mobile/font/iconfont.css">
<script type="text/javascript" src="/fstsets/mobile/js/jquery-1.9.1.min.js"></script>
<style type="text/css">
    .content-item{padding-top: 0px;}
    .pic-box img{height: 66px;}
</style>
</head>

<body>
	<assign name="typeid" value="$Think.get.typeid"/>
    <p class="tishi">您已投票成功</p>
	<div class="w">
        <div class="banner2"><img src="/assets/wfilm/images/wdy-banner.jpg"></div>
        <div class="content-list-box">

            <volist name="wfilmlist" id="vo" key="i">
                <div class="content-list clearfix">
                    <a href="{:U('article', array('typeid' => $vo['type_id'], 'resid' => $vo['id'], 'pm' =>$i))}" style="color:#333">
                        <div class="pic-box"><img src="{$vo['wfilm_pic']}"></div>
                        <div class="content-item">
                            <h5>{$vo['wfilm_title']}</h5>
                            <em>{$vo['wfilm_description']}</em>
                            <p>排名:<i class="shortmovie  shortmovie-jiangbei"></i>{$i}</p>
                        </div>
                    </a>
                    <div class="toupiao" style="display: none;">
                        <div class="toupiao-btn" actid="{$vo['id']}" num="{$vo['wfilm_votenum']}">结束</div>
                        <span><b class="num">{$vo['wfilm_votenum']}</b>票</span>
                    </div>
                </div>
            </volist>

        </div>
	</div>
	<!--footer-->
    <include file="Wfilm/mobile/footer" />
<script type="text/javascript">
    $(function(){

        var timesRun = 0;
        var interval = setInterval(function(){
            timesRun += 1;
            if(timesRun === 60){
                clearInterval(interval);
            }
            $(".tishi").fadeOut()
        }, 2000);

        $(".footer3 a").click(function(event) {
            $(this).addClass('current').siblings('.footer3 a').removeClass('current')
        });


        var lilengt = 0;
        var obj = $(".tabnav");

        $(".mvot_list:first").show();
        obj.find("li").each(function(index, element) {
            var t = $(this);
            lilengt += eval(t.width());
            t.click(function(){
                $(this).addClass("hover").siblings().removeClass("hover");
                $(".mvot_list:eq("+index+")").show().siblings().hide();
            })
        });

        $(".content-list").each(function(index,element){
            var t = $(this);
            t.find(".toupiao .toupiao-btn").click(function(){
				$(".tishi").html("投票已结束");
                /*var t1 = $(this);
                var articid = t1.attr("actid");
                var numval  = t.find(".toupiao b.num").html();
                $.ajax({
                    type: 'POST',
                    url: '__URL__/addVote',
                    dataType:'JSON',
                    data: {articid:articid,rand:Math.random()},
                    success: function (data) {
                        //  alert(JSON.stringify(data.votes));
                        if(data.r==1){
                            $(".tishi").show();
                            t.find(".toupiao b.num").html(parseInt(parseInt(numval)+1));
                            $(".tishi").html("投票成功");
                        }else{
                            $(".tishi").show();
                            $(".tishi").html("不能投票超过3次,明天再来吧");
                        }
                    }
                });*/
            });
        })


        $("a.status").each(function(index,element){
            var t = $(this);
            t.click(function(){
                var fstvid =  $(this).attr("fstvid");
                var netid  =  $(this).attr("netid");
                showdata(fstvid,netid);
            })
        })
        var obj = $("a.status:first()");
        var fstvid =  obj.attr("fstvid");
        var netid  =  obj.attr("netid");
        showdata(fstvid,netid);

        function showdata(fstvid,netid){
            $.ajax({
                type: 'POST',
                url: '__URL__/listajax',
                dataType:'html',
                data: {fstvid:fstvid,netid:netid,rand:Math.random()},
                success: function (data) {
                    //alert(data);
                    $("#data").html(data);
                    toupiao();
                }
            });
        }



    })


</script>
<script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?996ff5636cc816a4703cb2156ef1796b";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script>
</body>
</html>
